package br.edu.fanor.geract.entity;

import java.io.Serializable;
import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

@Entity
@Table(name="Contatos")
public class Contatos implements Serializable{

	@SequenceGenerator(name="SeqContato", sequenceName="SeqContato", allocationSize=1)
	@GeneratedValue(generator="SeqContato", strategy=GenerationType.SEQUENCE)
	@Column(name="IdAmizade")
	private static final long serialVersionUID = -6981930954826098965L;	
	private Long id;
	
	@NotNull
	@Column(name="Dataadicao")
	private Date dataadicao;
	
	@NotNull
	@Column(name="IdContato")
	private Integer idcontato;
	
	@Column(name="Bloqueio")
	private Boolean bloqueio;
	

	

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getDataadicao() {
		return dataadicao;
	}

	public void setDataadicao(Date dataadicao) {
		this.dataadicao = dataadicao;
	}

	public Integer getIdcontato() {
		return idcontato;
	}

	public void setIdcontato(Integer idcontato) {
		this.idcontato = idcontato;
	}

	public Boolean getBloqueio() {
		return bloqueio;
	}

	public void setBloqueio(Boolean bloqueio) {
		this.bloqueio = bloqueio;
	}

	@Override
	public String toString() {
		return "Contatos [id=" + id + ", dataadicao=" + dataadicao
				+ ", idcontato=" + idcontato + ", bloqueio=" + bloqueio + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Contatos other = (Contatos) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
				

}

